#pragma once
#include <vector>
#include <iostream>
using namespace std;

template<class T>
class Stack 
{
public:

	Stack() = default;

	Stack(size_t n, const T& val)
	{
		for (int i = 0; i < n; ++i)
		{
			_c.push_back(val);
		}
	}

	void push(const T& val)
	{
		_c.push_back(val);
	}

	void pop()
	{
		_c.pop_back();
	}

	T& top()
	{
		return _c.back();
	}

	const T& top() const
	{
		return _c.back();
	}

	bool empty()
	{
		return _c.empty();
	}

	size_t size()
	{
		return _c.size();
	}

private:
	vector<T> _c;
};